import { stringify } from 'qs';
import request from '@/utils/request';
import {formDataCode} from '@/utils/utils';

//获取客户消息列表
export async function GetMemberNotices(params) {
  return request(`/${window.storeId}/Setting/GetMemberNotices?${stringify(params)}`);
}

//获取订单消息列表
export async function GetOrderNotices(params) {
  return request(`/${window.storeId}/Setting/GetOrderNotices?${stringify(params)}`);
}

//开启或关闭短信消息
export async function SetSmsMessage(params) {
  return request(`/${window.storeId}/Setting/SetSmsMessage`, {
    method: 'POST',
    headers:{
      'Content-Type':"application/x-www-form-urlencoded",
    },
    body: formDataCode(params)
  });
}

//开启或关闭短信消息
export async function SetXcxMessage(params) {
  return request(`/${window.storeId}/Setting/SetXcxMessage`, {
    method: 'POST',
    headers:{
      'Content-Type':"application/x-www-form-urlencoded",
    },
    body: formDataCode(params)
  });
}
